package router

import (
	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// DevRouterV1Handler 初始化dev/v1路由
func DevRouterV1Handler(g *inject.Graph) *gear.Router {
	r := gear.NewRouter(gear.RouterOptions{
		Root:                  "/dev",
		IgnoreCase:            true,
		FixedPathRedirect:     true,
		TrailingSlashRedirect: true,
	})

	// 注册路由映射
	DevKeyMap(g, r)
	DevAlipayAppMap(g, r)
	DevWechatAppMap(g, r)
	DevUnionpayB2bMap(g, r)
	return r
}
